package com.shop.shopserver.service;

import com.shop.shopcommon.result.Result;
import com.shop.shoppojo.dto.GoodsSearchDTO;
import com.shop.shoppojo.vo.GoodsSearchVO;

import java.io.IOException;

public interface SearchService {
    /**
     * 将用户搜索词条保存到es中
     */
    Boolean saveUserSearchWord(String searchText) throws Exception;
    /**
     * 获取用户热搜词条，并拼接为字符串
     */
    String getTopUserSearchWord() throws Exception;

    /**
     * 商品搜索
     */
    GoodsSearchVO getSearchList(GoodsSearchDTO goodsSearchDTO) throws IOException;

    /**
     *  分类也进入商品列表 根据分类id搜索商品
     */
    GoodsSearchVO getSearchListByCategoryId(GoodsSearchDTO goodsSearchDTO) throws IOException;
}
